<div class="modal-resource-edit">
  <div class="modal-header">
    <h2>Edit <span class="hidden-xs">{{resource.kind | humanizeKind : true}}</span> {{resource.metadata.name}}</h2>
  </div>
  <div class="modal-body">
    <!-- Error messages -->
    <parse-error error="error" ng-if="error"></parse-error>

    <div ng-if="resourceChanged" class="alert alert-warning">
      <span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
      <span class="sr-only">Warning:</span>
      {{resource.kind | humanizeKind | upperFirst}} <strong>{{resource.metadata.name}}</strong> has
      changed since you started editing it. You'll need to copy any changes you've made and edit the
      {{resource.kind | humanizeKind}} again.
    </div>

    <!-- Editor -->
    <div ui-ace="{
      mode: 'yaml',
      theme: 'eclipse',
      onLoad: aceLoaded,
      rendererOptions: {
        fadeFoldWidgets: true,
        showPrintMargin: false
      }
    }" ng-model="model" class="editor yaml-mode"></div>
  </div>
  <div class="modal-footer">
      <button class="btn btn-lg btn-primary"
              type="button"
              ng-click="save()"
              ng-disabled="!modified || resourceChanged">Save</button>
      <button class="btn btn-lg btn-default"
              type="button"
              ng-click="cancel()">Cancel</button>
  </div>
</div>
